package leetcode61_70;

import org.junit.Test;

/**
 * @author shhjiang_001
 * @create 2020-03-22 21:55
 */
public class Solution70 {
    public int climbStairs(int n) {
        int[] ints = new int[n+1];
        ints[0] = 1;
        ints[1] = 2;
        for (int i = 2;i <= n;i++){
            ints[i] = ints[i-1]+ints[i-2];
        }
        return ints[n-1];
    }
    @Test
    public void test(){
        Solution70 solution70 = new Solution70();
        int i = solution70.climbStairs(2);
        System.out.println(i);
    }
}
